import { Body, Controller, Get, ParseIntPipe, Post, Query } from '@nestjs/common';
import { ChatHistoryService } from './chat-history.service';

@Controller('chat-history')
export class ChatHistoryController {
    constructor(private readonly chatHistoryService: ChatHistoryService) {}

    @Post('list')
    async list(@Body('chatroomId' , ParseIntPipe) chatroomId: number) {
        return this.chatHistoryService.list(chatroomId);
    }
}
